package com.jnc.core.base.model;

import com.jnc.common.base.BaseReq;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
public class Menu extends BaseReq {
    private static final long serialVersionUID = 1L;

    private Integer menuId;

    private Integer parentId;

    private String parentName;

    private String menuType;

    private String menuName;

    private String permission;

    private String menuUrl;

    private String menuIcon;

    private String isHide;

    private Integer menuSort;

    private String remark;

    private Date updateTime;

    private Date createTime;

    private List<Menu> children = new ArrayList<>();

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("menuId", menuId)
                .append("parentId", parentId)
                .append("parentName", parentName)
                .append("menuType", menuType)
                .append("menuName", menuName)
                .append("permission", permission)
                .append("menuUrl", menuUrl)
                .append("menuIcon", menuIcon)
                .append("isHide", isHide)
                .append("menuSort", menuSort)
                .append("remark", remark)
                .append("updateTime", updateTime)
                .append("createTime", createTime)
                .toString();
    }
}